import http from '@/http/index';
import { ConveyorComponents, ConveyorComponentsQuery } from '@/api/conveyor/type';
import { PageResult, Result } from '@/api/common/type';



// 分页条件查询列表
export const getConveyorComponentsList = (data:ConveyorComponentsQuery) => {
  return http.get("/conveyor/getConveyorComponentsList",data)
}

/**
 * 获取输送件价格详情
 * @param id 输送件价格ID
 */
export function getConveyorComponents(id: number) {
  return http.get<Result<ConveyorComponents>>(`/conveyor/getConveyorComponents/${id}`);
}

/**
 * 新增输送件价格
 * @param data 输送件价格数据
 */
export function createConveyorComponents(data: ConveyorComponents) {
  return http.post<Result<null>>('/conveyor/createConveyorComponents', data);
}

/**
 * 修改输送件价格
 * @param data 输送件价格数据
 */
export function updateConveyorComponents(data: ConveyorComponents) {
  return http.put<Result<null>>('/conveyor/updateConveyorComponents', data);
}

/**
 * 删除输送件价格
 * @param id 输送件价格ID
 */
export function deleteConveyorComponents(id: number) {
  return http.delete<Result<null>>(`/conveyor/deleteConveyorComponents/${id}`);
} 